#include "../Manager/GUIManager.h"
#include "WidgetImpl.h" 

namespace GUI
{
	namespace Win32
	{

		WidgetImpl::WidgetImpl()
		{
		}

		WidgetImpl::~WidgetImpl()
		{
			GUIManager::GetInstance().Unregister(m_hWidget);
		}

		void WidgetImpl::SetSize(int _iWidth, int _iHeight)
		{
			m_iWidth = _iWidth;
			m_iHeight = _iHeight;
		}

		void WidgetImpl::SetPosition(int _x, int _y)
		{
			m_iX = _x;
			m_iY = _y;
		}

		void WidgetImpl::SetStyle(const std::string & _style)
		{

		}

		bool WidgetImpl::Create(Core::GUI::IWidget * _pWidget)
		{
			m_hWidget = CreateHandle();
			if (m_hWidget == NULL)
				return false;

			GUIManager::GetInstance().Register(m_hWidget, _pWidget);
			return true;
		}
	}
}